<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp - www.adobe.com">
<title>Creating a derived metric using a function</title>
<link rel="stylesheet" href="userhelp_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='userhelp.css'>");}
//-->
</script>
<style type="text/css">
<!--
p.whs1 { margin-left:0px; }
img_whs2 { border:none; width:17px; height:17px; float:none; border-style:none; }
ol.whs3 { list-style:decimal; }
p.whs4 { margin-left:40px; }
ul.whs5 { list-style:disc; }
-->
</style><script type="text/javascript" language="JavaScript">
<!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
{
  var strNSS = "<style type='text/css'>";
  strNSS += "p.whs1 {margin-left:1pt; }";
  strNSS +="</style>";
  document.write(strNSS);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("Analyzing report and document results\nCalculating data on a report: Metrics\nCreating a metric based on existing metrics: Derived metrics\nCreating a derived metric using a function");
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if(1)
	{
	
	}

	if (window.setRelStartPage)
	{
	setRelStartPage("MicroStrategy_Web_Help.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();

//-->
</script>
<h1>Creating a derived metric using a function</h1>
<p>When you create a 
<a HREF="Create_derived_metrics.htm">derived metric</a>, 
 you can define it using a function, which allows you to create a more 
 complex derived metric. For example, you can choose a RunningSum function 
 to create a RunningSum of Revenue (RunningSum(Revenue)) 
 metric. </p>
<p>To create a derived metric using a function, you select the function, 
 define its arguments and parameters, and then specify the metrics on which 
 to base the new metric.</p>
<p>Refer to the <span style="font-style: italic;"><I>MicroStrategy Functions 
 Reference</I></span> to learn about the types of functions available in MicroStrategy, 
 what each function calculates, the correct syntax to use for each, and 
 examples.</p>
<p>The steps below show you how to create a derived metric in a report. 
 You can create a derived metric in a document by right-clicking a metric 
 and selecting <span style="font-weight: bold;"><B>Insert Function</B></span>. 
 For details and steps, see 
<a href="Creating_derived_metrics_documents.htm">Creating 
 derived metrics in documents</a>.</p>
<h2>Prerequisites</h2>
<ul>
<li class=p-TopicTextBulleted><p class=TopicTextBulleted>You must have 
 MicroStrategy OLAP Services to create derived metrics. To evaluate OLAP 
 Services, contact your MicroStrategy Account Executive or email MicroStrategy 
 directly at 
<a href="mailto:info@microstrategy.com">info@microstrategy.com</a>. 
 &nbsp;</p></li>
	
<li class=p-TopicTextBulleted><p class=TopicTextBulleted>You must have 
 the necessary privileges to add or remove metrics and calculations.</p></li>
	
<li class=p-TopicTextBulleted><p class=TopicTextBulleted>You must have 
 DHTML enabled. See 
<a HREF="DHTML-only_features_in_Web.htm">Enabling DHTML 
 in Web</a>.</p></li>
</ul>
<h2>To create a derived metric using a function</h2>
<ol class=whs2 style="list-style: decimal;" type=1>
	
<li class=p><p class="whs1">Click the name of a report 
 to execute it. The report must be in either Grid view or Grid and Graph 
 view.</p></li>
	
<li class=p><p>From the <span style="font-weight: bold;"><B>Data</B></span> 
 menu, select <span style="font-weight: bold;"><B><b>Insert New Metric </B></span><span 
 style="font-weight: normal;">(</span></b><span style="font-weight: bold;"> 
 <B></B></span><img src="images/functionwizard.gif" x-maintain-ratio="TRUE" width="17px" height="17px" border="0" class="img_whs2"> icon). The Insert New Metric dialog box is displayed.</p></li>
	
<li class=p><p>Define the formula that should appear before the function, 
 if any.</p></li>
	
<li class=p><p>Click the <span style="font-weight: bold;"><B>Function 
 Wizard</B></span> icon<span style="font-weight: bold;"> <B></B></span><img src="images/functionwizard.gif" x-maintain-ratio="TRUE" width="17px" height="17px" border="0" class="img_whs2">. 
 The Insert Function dialog box opens. </p></li>
	
<li class=p><p>From the <span style="font-weight: bold;"><B>Select a category</B></span> 
 drop-down list, select the function to use. When you select a folder, 
 the list of functions in that folder are displayed in the <span style="font-weight: bold;"><B>Select 
 a function</B></span> area. A description of each function is displayed below 
 the area.<span style="font-weight: bold;"><B><br>

	<br>

	Note</B></span>: Refer to the <span style="font-style: italic;"><I>MicroStrategy 
 Functions Reference</I></span> for information on the types of functions available 
 in MicroStrategy, what each function calculates, the correct syntax to 
 use for each, and examples. </p></li>
</ol>
<ol start="6" type="1" class="whs3">
	
<li class=p><p>Click <span style="font-weight: bold;"><B>OK</B></span>. The 
 Function Arguments dialog box opens. </p></li>
	
<li class=p><p>Define the function by entering values for each parameter. 
 The arguments and parameter options that appear differ depending on the 
 function you chose. </p></li>
</ol>
<p class="whs4"><span style="font-weight: bold;"><B>Note</B></span>: 
 Refer to the <span style="font-style: italic;"><I>MicroStrategy Functions 
 Reference</I></span> for information on the correct syntax to use for each 
 function and examples. </p>
<h3>Related topics</h3>
<ul type="disc" class="whs5">
	
<li class=p><p>
<a HREF="Create_derived_metrics.htm">Creating a metric 
 based on other metrics: Derived metrics</a></p></li>
	
<li class=p><p>
<a HREF="Creating_derived_metrics_documents.htm">Creating 
 derived metrics in documents</a></p></li>
</ul>
<script type="text/javascript" language="javascript1.2">
<!--
highlightSearch();
if (window.writeIntopicBar)
	writeIntopicBar(0);
if(0)
{

}
//-->
</script>
</body>
</html>
